CXX = g++
CFLAGS = -Wall -O -g
TARGET = demo

%.o : &.cpp
	${CXX} ${CFLAGS} -c $< -o $@


SOURCE = $(wildcard *.cpp)
OBJS = $(patsubst %.cpp, %.o, ${SOURCE})

${TARGET} : ${OBJS}
	${CXX} ${OBJS} -o ${TARGET}

.PHONY : clean
clean:
	-rm ${OBJS}
